import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import HelpView from "@/views/help/HelpView.vue";

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect: '/index',
    children: [
      {path: 'Index', component: () => import('../views/home/IndexView.vue')},
      {path: 'login', component: () => import('../views/home/LoginView.vue')},
      {path: 'reg', component: () => import('../views/home/RegView.vue')},
      // {path: 'index', component: () => import('../views/home/IndexView1.vue')},
      {path: 'detail', component: () => import('../views/home/DetailView.vue')},
      {path: 'vehicle', component: () => import('../views/Vehicle/Vehicle.vue')},
      {path: 'help', component: () => import('../views/help/HelpView.vue')},
      {path: 'test', component: () => import('../views/home/testView1.vue')},

      {path: 'station', component: () => import('../views/station/StationView.vue')},
      {path:'xunfei',component:()=>import('../views/xunfei/XunFeiView.vue')},
    ]
  },

  {
    path: '/help',
    name: 'host',
    component: HelpView,
    children:[
      {path: '/help/regHelp', component: () => import('../views/help/user/RegHelpView.vue')},
      {path: '/help/protocol', component: () => import('../views/help/user/ProtocolView.vue')},
      {path: '/help/privacy', component: () => import('../views/help/user/PrivacyView.vue')},
      {path: '/help/password', component: () => import('../views/help/account/PasswordView.vue')},
      {path: '/help/vip', component: () => import('../views/help/account/VipView.vue')},
      {path: '/help/pointMarket', component: () => import('../views/help/account/PointMarketView.vue')},
      {path: '/help/unsubscribe', component: () => import('../views/help/account/UnsubscribeView.vue')},
      {path: '/help/process', component: () => import('../views/help/book/ProcessRuleView.vue')},
      {path: '/help/order', component: () => import('../views/help/book/OrderView.vue')},
      {path: '/help/invoice', component: () => import('../views/help/book/InvoiceView.vue')},
      {path: '/help/restriction', component: () => import('../views/help/book/RestrictionView.vue')},
      {path: '/help/dispose', component: () => import('../views/help/accident/DisposeView.vue')},
      {path: '/help/safeGuard', component: () => import('../views/help/accident/SafeguardServiceView.vue')},
      {path: '/help/standBy', component: () => import('../views/help/accident/StandByCarView.vue')},
      {path: '/help/cost', component: () => import('../views/help/servicecost/OthercostView.vue')},
      {path: '/help/credit', component: () => import('../views/help/servicecost/CreditView.vue')},
      {path: '/help/contact', component: () => import('../views/help/servicecost/ContactView.vue')},
      {path: 'vehicle', component: () => import('../views/Vehicle/Vehicle.vue')},

    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
